﻿using GrayParrot.Web.Formly;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebTest.Metadata
{
    public class PalinsestoMetadata
    {
        //[FieldGroup(GroupName = "secondo", Row = 1, Index = 1, NumberOfColumns = 4)]
        //[FormFieldAttribute(Type = FormFieldTypes.Input)]
        //[TextTemplateOptionsAttribute(Label = "Palinsesto",
        //    Description = "Lunghezza max 50 caratteri",
        //    Placeholder = "Indicare il palinsesto",
        //    Required = true,
        //    MinLength = 0,
        //    MaxLength = 50)]
        //public string Palinsesto { get; set; }

        //[Events(Event = EventTypes.OnChange, Callback = "ChangeCallback")]
        //[AddOn(Position = Position.Right, Class = "glyphicon glyphicon-ok", OnClick = "CheckCallback")]
        //[FieldGroup(GroupName = "secondo", Row = 1, Index = 2, NumberOfColumns = 4)]
        //[FormFieldAttribute(Type = FormFieldTypes.Input)]
        //[TextTemplateOptionsAttribute(Label = "Avvenimento",
        //    Description = "Lunghezza max 50 caratteri",
        //    Placeholder = "Indicare l'avvenimento",
        //    Required = true,
        //    MinLength = 0,
        //    MaxLength = 50)]
        //public string Avvenimento { get; set; }

        [Events(Event = EventTypes.OnChange, Callback = "ChangeCallback")]
        [FieldGroup(GroupName = "primo", Row = 1, Index = 1, NumberOfColumns = 6)]
        [FormFieldAttribute(Type = FormFieldTypes.GrayParrotDateTimePicker)]
        [GrayParrotDateTimePickerOptionsAttribute(Label = "Data Avvenimento",
            Description = "Data iniziale dell'avvenimento",
            Placeholder = "Indicare la data dell'avvenimento",
            Required = true,
            MinuteStep = 10, 
            Format = "dd/mm/yyyy", 
            ShowTimePanel = false,
            WithInitialDate=false)]
        public DateTime DataAvvenimento { get; set; }

        //[Events(Event = EventTypes.OnChange, Callback = "ShowImg")]
        //[FieldGroup(GroupName = "primo", Row = 1, Index = 2, NumberOfColumns = 6)]
        //[FormFieldAttribute(Type = FormFieldTypes.Upload)]
        //[ImageTemplateOptionsAttribute(Label = "Foto",
        //    Description = "Inserisci la foto dell'articolo",
        //    Placeholder = "",
        //    Required = false,
        //    Folder = "/Profili_imgs")]
        //public string FotoArticolo { get; set; }

        [Events(Event = EventTypes.OnChange, Callback = "ShowImg")]
        [FieldGroup(GroupName = "primo", Row = 1, Index = 2, NumberOfColumns = 6)]
        [FormFieldAttribute(Type = FormFieldTypes.GrayParrotFileUpload)]
        [GrayParrotFileUploadOptionsAttribute(Label = "Foto",
            Description = "Inserisci la foto dell'articolo",
            Placeholder = "",
            Required = true,
            Folder = "/img_products")]
        public string FotoArticolo { get; set; }
    }
}